<?php
namespace app\common\validate;
use think\facade\Db;
use think\Validate;

class Classify extends Validate
{

    protected $rule=[
        'id'    =>'require',
        'name'    =>'require',

    ];
    protected $message = [
        'id.require'    => '关键参数不能为空',

        'name.require'    => '分类名称不能为空',
    ];
    protected $scene = [
        'add' =>['name'],
        'edit' =>['id','name'],
    ];
}